package com.yupao.service;


import com.baomidou.mybatisplus.extension.service.IService;
import com.yupao.model.dto.TeamDTO;
import com.yupao.model.dto.TeamJoinRequest;
import com.yupao.model.dto.TeamQuitRequest;
import com.yupao.model.dto.TeamUpdateRequest;
import com.yupao.model.entity.Team;
import com.yupao.model.vo.LoginUserVO;
import com.yupao.model.vo.UserTeamVO;

import java.util.List;

/**
* @author wangzhi
* @description 针对表【team(队伍表)】的数据库操作Service
* @createDate 2024-09-22 16:45:10
*/
public interface TeamService extends IService<Team> {


    /**
     *添加用户
     * @param team
     * @param loginUser
     * @return
     */
    Long addTeam(TeamDTO team, LoginUserVO loginUser);

    /**
     * 查询用户
     * 如果条件为空只能查询我创建的队伍
     * @param teamDTO
     * @return
     */
    List<UserTeamVO> listTeams(TeamDTO teamDTO);

    /**
     * 修改用户信息
     * @param teamUpdateRequest
     * @return
     */
    boolean updateTeam(TeamUpdateRequest teamUpdateRequest);

    /**
     * 用户加入队伍
     * @param teamJoinRequest
     * @return
     */
    Boolean joinTeam(TeamJoinRequest teamJoinRequest);

    /**
     * 退出队伍
     * @param teamQuitRequest
     * @return
     */
    boolean quitTeam(TeamQuitRequest teamQuitRequest);

    /**
     * 解散队伍
     * @param teamId
     * @return
     */
    boolean deleteTeam(long teamId);

    /**
     * 查看个人创建的队伍
     * @return
     */
    List<UserTeamVO> listMyTeams();

    /**
     * 查看个人加入队伍
     * @return
     */
    List<UserTeamVO> listMyJoinTeams();

}
